// 全局定义一个 promiseResolve

let promiseResolve = null;

/**
 * 获取 promise
 */
export function getAddressPromise() {
  return new Promise((resolve) => {
    promiseResolve = resolve;
  });
}

/**
 * 完成 Promise
 * @param {*} address 地址对象
 */
export function resolveAddressPromise(address) {
  promiseResolve && promiseResolve(address);
}
